package test;

import org.tellurium.bootstrap.TelluriumSupport;
import org.tellurium.connector.SeleniumConnector;
import org.tellurium.test.java.TelluriumJavaTestCase;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import module.SimplifyUFModule;

public class SimplifyUFTestCase extends TelluriumJavaTestCase{
	
	private static SimplifyUFModule sum;
	
	@BeforeClass
	public static void initUi() {
		tellurium = TelluriumSupport.addSupport();
		tellurium.start(customConfig);
		connector = (SeleniumConnector) tellurium.getConnector();

		sum = new SimplifyUFModule();
		sum.defineUi();
	}

	@BeforeMethod
	public void connectToGoogle() {
		connectUrl("http://localhost:8080/simplify");		
	}
	
	@Test
	public void testarCadastramentoUF(){
		sum.abrirListagem();
		sum.inserirDados();
	}
	
	@Test(dependsOnMethods={"testarCadastramentoUF"})
	public void testarAlteracaoUF(){
		sum.abrirListagem();
		sum.alterarDados();
	}
	
}
